package book.constrains;

public class SystemConstants {
    // 操作类型：管理员、读者
    public static final String TYPE_ADMIN = "ADMIN";   // 管理员
    public static final String TYPE_READER = "READER"; // 读者

    // 管理员操作常量
    public static final String ADMIN_LOGIN = "ADMIN_LOGIN";          // 管理员登录
    public static final String ADMIN_ADD_BOOK = "ADMIN_ADD_BOOK";    // 添加书籍
    public static final String ADMIN_DELETE_BOOK = "ADMIN_DELETE_BOOK"; // 删除书籍
    public static final String ADMIN_UPDATE_BOOK = "ADMIN_UPDATE_BOOK"; // 更新书籍
    public static final String ADMIN_FINDALL_BOOKS = "ADMIN_FINDALL_BOOKS"; // 查询所有书籍
    public static final String ADMIN_VIEW_BORROW_RECORDS = "ADMIN_VIEW_BORROW_RECORDS"; // 查询借阅记录
    public static final String ADMIN_ADD_READER = "ADMIN_ADD_READER"; // 添加读者
    public static final String ADMIN_DELETE_READER = "ADMIN_DELETE_READER"; // 删除读者
    public static final String ADMIN_FINDALL_READERS = "ADMIN_FINDALL_READERS"; // 查询所有读者

    // 读者操作常量
    public static final String READER_LOGIN = "READER_LOGIN";         // 读者登录
    public static final String READER_BORROW_BOOK = "READER_BORROW_BOOK";   // 借书
    public static final String READER_RETURN_BOOK = "READER_RETURN_BOOK";   // 还书
    public static final String READER_FINDALL_BOOKS = "READER_FINDALL_BOOKS"; // 查询所有书籍
    public static final String READER_VIEW_BORROWED_BOOKS = "READER_VIEW_BORROWED_BOOKS"; // 查询自己借的书

    // 静态内部类：响应码
    public static class Code {
        public static final String OPT_SUCCESS = "200"; // 操作成功
        public static final String OPT_FAILURE = "500"; // 操作失败
        public static final String NOT_FOUND = "404";   // 资源未找到
        public static final String UNAUTHORIZED = "401"; // 未授权
    }
}
